import React, { useEffect, useState } from "react";
import { SettingApi } from "@/api/setting";

export const useSettings = function() {
  const [settings, setSettings] = useState<any>({});
  useEffect(() => {
    SettingApi.getSettings().then(res => {
      setSettings(res);
    });
  }, []);
  return settings;
};
